package com.zmn.plat.services.impl.plat.servcategory;

import java.util.List;

import javax.annotation.Resource;

import com.zmn.plat.model.vo.plat.servcategory.PlatServCategoryVO;
import org.springframework.stereotype.Service;

import com.zmn.plat.model.entity.plat.servcategory.PlatServCategory;
import com.zmn.plat.persistence.interfaces.plat.servcategory.PlatServCategoryDAO;
import com.zmn.plat.services.interfaces.plat.servcategory.PlatServCategoryService;

/**
 * 平台开通服务分类
 *
 * @author linfeng
 * @since 2020/04/13 12:19:07
 */
@Service
public class PlatServCategoryServiceImpl implements PlatServCategoryService {

    @Resource
    private PlatServCategoryDAO platServCategoryDAO;

    @Override
    public PlatServCategory findByKey(Integer id) {
        return platServCategoryDAO.findByKey(id);
    }

    @Override
    public List<PlatServCategory> listByPlat(Integer plat) {
        return platServCategoryDAO.listByPlat(plat);
    }

    @Override
    public List<PlatServCategoryVO> listVoByPlat(Integer plat) {
        return platServCategoryDAO.listVoByPlat(plat);
    }

    @Override
    public List<PlatServCategory> listByPlatAndServCategId(Integer plat, Integer servCategId) {
        return platServCategoryDAO.listByPlatAndServCategId(plat, servCategId);
    }

    @Override
    public Integer countOpenCategByPlatAndCateg(Integer plat, Integer servCategId, Integer showCategTwoId) {
        return platServCategoryDAO.countOpenCategByPlatAndCateg(plat, servCategId, showCategTwoId);
    }

    @Override
    public int updateByKey(PlatServCategory record) {
        return platServCategoryDAO.updateByKey(record);
    }

    @Override
    public int insert(PlatServCategory record) {
        return platServCategoryDAO.insert(record);
    }

    @Override
    public int insertBatch(List<PlatServCategory> list) {
        return platServCategoryDAO.insertBatch(list);
    }

    @Override
    public int deleteByKey(Integer id) {
        return platServCategoryDAO.deleteByKey(id);
    }

    @Override
    public int deleteByPlat(Integer plat) {
        return platServCategoryDAO.deleteByPlat(plat);
    }

    @Override
    public int deleteByPlatAndServCategId(Integer plat, Integer servCategId) {
        return platServCategoryDAO.deleteByPlatAndServCategId(plat, servCategId);
    }

    @Override
    public int deleteBatch(List<PlatServCategory> list) {
        return platServCategoryDAO.deleteBatch(list);
    }
}
